-- GENERATED SPELL FOR [Snokh Blackspine] --


function spell0_16051(pUnit, Event) --@Blast Wave,Self--
pUnit:FullCastSpellOnTarget(23039,pUnit)
pUnit:RegisterEvent('Sorts_16051', 8000, 1)
end

function spell1_16051(pUnit, Event) --@Blink,Self--
pUnit:FullCastSpellOnTarget(14514,pUnit)
pUnit:RegisterEvent('Sorts_16051', 1348, 1)
end

function spell2_16051(pUnit, Event) --@Drink Healing Potion,Self--
pUnit:FullCastSpellOnTarget(15503,pUnit)
pUnit:RegisterEvent('Sorts_16051', 532, 1)
end

function spell3_16051(pUnit, Event) --@Flamestrike,n/a--
pUnit:FullCastSpellOnTarget(20827,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_16051', 11000, 1)
end

function spell4_16051(pUnit, Event) --@Pyroblast,n/a--
pUnit:FullCastSpellOnTarget(17273,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_16051', 18000, 1)
end

function spell5_16051(pUnit, Event) --@Scorch,n/a--
pUnit:FullCastSpellOnTarget(15241,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_16051', 1500, 1)
end

function Sorts_16051(pUnit, Event)
local choix_sorts_16051 = math.random(0, 5)
if choix_sorts_16051 == 0 then
pUnit:RegisterEvent('spell0_16051', 1, 1)
end
if choix_sorts_16051 == 1 then
pUnit:RegisterEvent('spell1_16051', 1, 1)
end
if choix_sorts_16051 == 2 then
pUnit:RegisterEvent('spell2_16051', 1, 1)
end
if choix_sorts_16051 == 3 then
pUnit:RegisterEvent('spell3_16051', 1, 1)
end
if choix_sorts_16051 == 4 then
pUnit:RegisterEvent('spell4_16051', 1, 1)
end
if choix_sorts_16051 == 5 then
pUnit:RegisterEvent('spell5_16051', 1, 1)
end
end

function mob16051_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_16051', math.random(1500, 3000), 1)
end

function mob16051_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob16051_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob16051_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(16051, 1, 'mob16051_Action')
RegisterUnitEvent(16051, 2, 'mob16051_Leave')
RegisterUnitEvent(16051, 3, 'mob16051_Kill')
RegisterUnitEvent(16051, 4, 'mob16051_Die')
